package com.lala.controller;

import com.lala.entity.ClientComplaint;
import com.lala.service.ClientComplaintService;
import com.lala.util.ResultJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 霍明铭
 * @date 2020/3/31 15:10
 */
@RestController
@RequestMapping("/complaint")
public class ClientComplaintController {
    @Autowired
    ClientComplaintService complaintService;
    @PostMapping("/save")
    public ResultJson save(ClientComplaint complaint){
       try {
           complaintService.save(complaint);
           return new ResultJson(200,"",null);
       }catch (Exception e){
           return new ResultJson(500,"",null);
       }

    }



}
